@import "~@/theme.less";
@import "~@/dark.less";

/**
 * ============
 * 通用配置或样式
 * ============
 **/
@fontColor: rgba(0, 0, 0, 0.65);
@primaryColor: #da5040;
@darkBackgroundColor: #030303;
@dark2ndBackgroundColor: #212121;

.mobile(@rules) {
  @media only screen and (max-width: 800px) {
    @rules();
  }
}
.dark(@rules) {
  @media (prefers-color-scheme: dark) {
    @rules();
  }
}

/**
 * ============
 * ============
 **/

.heartbeat {
  display: inline-block;
  -webkit-animation: animation-heartbeat 1.3s ease 0s infinite normal;
  animation: animation-heartbeat 1.3s ease 0s infinite normal
}

@-webkit-keyframes animation-heartbeat {
  0%, 28%, 70% {
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  14%, 42% {
    -webkit-transform: scale(1.3);
    transform: scale(1.3)
  }
}

@keyframes animation-heartbeat {
  0%, 28%, 70% {
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  14%, 42% {
    -webkit-transform: scale(1.3);
    transform: scale(1.3)
  }
}

// 文字n行+省略号
.maxLine(@n) {
  word-break: break-all;
  text-overflow: ellipsis;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2 !important;
  /* autoprefixer: off */
  -webkit-box-orient: vertical !important;
  /* autoprefixer: on */
}

// 文字一行+省略号
.oneLine() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 背景图片居中显示
.centerBackground() {
  background: no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
}

.a() {
  border-bottom: 4px solid #e2e8f0;
  text-decoration: inherit;
  box-sizing: inherit;
  color: #a0aec0;
  font-weight: 700;
}